<template>
   <el-form label-width="100px" class="demo-stus">
    <el-form-item label="姓名" prop="name">
      <el-input v-model="addOrdersData.name"></el-input>
    </el-form-item>
    <el-form-item label="数量" prop="num">
      <el-input v-model="addOrdersData.num"></el-input>
    </el-form-item>
 <el-form-item label="价格" prop="price">
      <el-input v-model="addOrdersData.price"></el-input>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="addOrdersAsync">立即创建</el-button>
      <!-- <el-button @click="resetForm('stus')">重置</el-button> -->
    </el-form-item>
  </el-form>
</template>

<script>
import { createNamespacedHelpers } from "vuex";
const { mapState, mapActions, mapMutations } = createNamespacedHelpers(
  "orders"
);
export default {
computed:{
    ...mapState(['addOrdersData'])
},
methods:{
    ...mapActions(['addOrdersAsync'])
}
}
</script>

<style>

</style>